
/**
 * Write a description of class AligningColumns here.
 * 
 * @author Amrita Mukherjee
 * @version 11/1/12
 */
public class AligningColumns
{
    public static void main(String[] args)
    {
        String item1 = "carrot";
        String item2 = "King Salmon";
        String item3 = "Cabernet Saugvignon (case)";
        
        double price1 = 0.23;
        double price2 = 10.45;
        double price3 = 1257.68;
        
        System.out.printf("%-25s: %7.2f\n", item1, price1);
        System.out.printf("%-25s: %7.2f\n", item2, price2);
        System.out.printf("%-25s: %7.2f\n", item3, price3);
    }
}
/* my test session:
carrot                   :    0.23
King Salmon              :   10.45
Cabernet Saugvignon (case): 1257.68

 */